package logic

import (
	"context"

	"go-weixin/app/preferential/rpc/internal/svc"
	"go-weixin/app/preferential/rpc/pb/proto/preferential"

	"github.com/zeromicro/go-zero/core/logx"
)

type CouponRegisterLogic struct {
	ctx    context.Context
	svcCtx *svc.ServiceContext
	logx.Logger
}

func NewCouponRegisterLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CouponRegisterLogic {
	return &CouponRegisterLogic{
		ctx:    ctx,
		svcCtx: svcCtx,
		Logger: logx.WithContext(ctx),
	}
}

func (l *CouponRegisterLogic) CouponRegister(in *preferential.CouponRegisterReq) (*preferential.CouponRegisterResp, error) {
	// todo: add your logic here and delete this line
	logx.Info(in)

	return &preferential.CouponRegisterResp{
		Id:   in.Id,
		Name: in.Name,
	}, nil
}
